#!/usr/bin/env python
# -*- coding:utf-8 -*-
# 裁判文书网爬虫selenium版

from utils.utils import get_chrome
from time import sleep

chrome = get_chrome()
url = 'https://wenshu.court.gov.cn/website/wenshu/181217BMTKHNT2W0/index.html?pageId=775a442cb24738030d83553cab82643c' \
      '&s8=02 '
chrome.get(url=url)
# 因为登录框在iframe框中，需要先切换到iframe中
chrome.switch_to.frame('contentIframe')
chrome.find_element_by_xpath('//*[@id="root"]/div/form/div[1]/div[1]/div/div/div/input').send_keys('17378279545')
chrome.find_element_by_xpath('//*[@id="root"]/div/form/div[1]/div[2]/div/div/div/input').send_keys('1257qweYS')
chrome.find_element_by_xpath('//*[@id="root"]/div/form/div[3]/span').click()

sleep(10)












